﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using HK2009.BusinessFacade;
using HK2009.EntityManage;
using HK2009.Common;
using HK2009.EntityQuery;
namespace HK2009.BusinessFacadeHandler
{
   
    public class BNTrackingHandler : IBNTrackingHandler
    {
        DataBase db = new DataBase();
        BN_TTrackingManage manager = new BN_TTrackingManage();

        /// <summary>
        /// 根据sql语句同参数获取列表
        /// </summary>
        /// <param name="sqlStr"></param>
        /// <param name="parms"></param>
        /// <returns></returns>
        public DataTable GetList(string sqlStr, SqlParameter[] parms)
        {
            return db.RunSqlTab(sqlStr, parms);
        }

        public bool AddTracking(BN_TTrackingQuery query)
        {
            return manager.InsertBN_TTracking(query);
        }

        public bool AddTracking(string sqlStr, SqlParameter[] parms)
        {
            return db.ExecSqlTransaction(sqlStr, parms);
        }

        public bool DeleteByID(int pkid)
        {
            return manager.DeleteBN_TTracking(pkid);
        }
    }
}
